<?php
session_start();
ob_start('ob_gzhandler');
include 'config.php';

$idMenu = $_GET['idMenu'];
$detail = $_GET['detail'];

$tc->html($domain);

$home = $tc->menu_one(1);
$row_home = mysql_fetch_array($home);
$title = $row_config['title'];
$description = $row_home['metaDescription'];
$keywords = $row_home['metaKeyword'];
$image = '/images/logo1.png';
$url = $_SERVER['REQUEST_URI'];

$tc->seo($domain,$title,$description,$keywords,$image,$url);

ob_start();
$include = include_once('blocks/home.php');
$include = ob_get_clean();

$tc->css($css);
?>
<div id="container">
    <div id="intro">
		<div id="col1">
            <div id="hoitu1" class="hoitu"><a href="mua-ban-trao-doi/" target="_blank">MUA BÁN<br />TRAO ĐỔI</a></div>
            <div id="hoitu2" class="hoitu"><a href="benh-vien-xe-co/" target="_blank">bệnh viện<br />xe cổ</a></div>
            <div id="hoitu3" class="hoitu"><a href="diendan/forum.php" target="_blank">diễn dàn<br />xe cổ</a></div>
            <div id="hoitu4" class="hoitu"><a href="tin-tuc-su-kien/" target="_blank">tin tức<br />sự kiện</a></div>
        </div>
        
        <div id="col2">
        	<?php
            $event = mysql_query('SELECT name,url_hinh,link FROM slider_banner WHERE `delete`=0 AND status=1 AND position_id=3');
			if(mysql_num_rows($event) > 0) {
				$row_event = mysql_fetch_array($event);
				echo '<div id="event"><a href="'.$row_event['link'].'" target="_blank"><img src="upload/images/slider/'.$row_event['url_hinh'].'" alt="'.$row_event['name'].'" /></a></div>';
			}
			else echo '<div id="event"></div>';
			?>
            <div id="danxe">
                <?php
                $danxe = mysql_query("SELECT id,name,url_hinh FROM slider_banner WHERE `delete`=0 AND status=1 AND position_id=2 ORDER BY date_update DESC");
				while($row = mysql_fetch_array($danxe)){
					echo '<a href="#" id="'.$row['url_hinh'].'" class="iteminto '.$row['id'].'"><img src="upload/images/xe_intro/'.$row['url_hinh'].'" alt="'.$row['name'].'" /></a>';
				}
				?>
            </div>
            <div id="menu">
            <?php
            $menu = mysql_query("SELECT name,url FROM menu WHERE `delete`=0 AND status=1 AND parent_id=0 AND position_id LIKE '%,2,%' ORDER BY `order`");
			$jj = 0;
			while($row_menu = mysql_fetch_array($menu)){
				$jj++;
				if($jj == 5) echo '<a href="javascript:;" target="_blank" style="margin-left:180px">&nbsp;</a>';
				echo '<a href="'.$row_menu['url'].'" target="_blank">'.$row_menu['name'].'</a> &nbsp;|&nbsp; ';
			}
			?>
            </div>
            <div id="logo"><a href="index.html" target="_blank"><img src="images/logo.png" alt="Câu lạc bộ xe cổ Hồng Cường - Hong Cuong Club" /></a></div>
        </div>
        <div id="col3">
            <div id="trungtam"><a href="trung-tam-tiec-cuoi/" target="_blank"><img src="images/tieccuoi.gif" alt="trung tâm tiệc cưới" /></a></div>
            <div id="langamthuc"><a href="lang-am-thuc/" target="_blank"><img src="images/langamthuc.gif" alt="làng ẩm thực" /></a></div>
            <div id="xedocquyen"><a href="javascript:;"><img src="images/car.png" alt="xe cổ độc quyền" /></a></div>
        </div>
    </div>
</div>
<div id="popup"></div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script type="text/javascript" src="script/jquery.kinetic.js"></script>
<script type="text/javascript" src="script/jquery.kinetic.min.js"></script>
<script type="text/javascript" src="intro.js"></script>
<script type="text/javascript">
function browserName(){
	var Browser = navigator.userAgent;
	if (Browser.indexOf('MSIE') >= 0){ Browser = 'MSIE'; }
	else if (Browser.indexOf('Firefox') >= 0){ Browser = 'Firefox'; }
	else if (Browser.indexOf('Chrome') >= 0){ Browser = 'Chrome'; }
	else if (Browser.indexOf('Safari') >= 0){ Browser = 'Safari'; }
	else if (Browser.indexOf('Opera') >= 0){ Browser = 'Opera'; }
	else{ Browser = 'UNKNOWN'; }
	return Browser;
}
var Browser = browserName();
var time1 = 1600;
var time2 = 1900;
var time3 = 700;
var time4 = 1000;
var total = 3456;
var width = $(window).width();
var height = $(window).height();
var item1 = (total - width) / 1000;
var item3 = (2000 - width);
var t;
$('#container').height(height);
$('#container').kinetic();
function right(){ $('#container').kinetic('start',{velocity:10}); }
function left(){ $('#container').kinetic('start',{velocity:-8}); }
function stopa(){ $('#container').kinetic('stop'); }
right();
if((Browser=='Firefox') || (Browser=='Safari') || (Browser=='Opera')){
	var item2 = item1 * time1;
	var item4 = (item3*time3)/1000;
	t = setTimeout('left()',parseInt(item2));
	setTimeout('stopa()',parseInt(item2)+parseInt(item4));
}else if(Browser=='Chrome'){
	var item2 = item1 * time2 + 500;
	var item4 = (item3*time4)/1000;
	t = setTimeout('left()',parseInt(item2));
	setTimeout('stopa()',parseInt(item2)+parseInt(item4)+100);
}else{
	var item2 = item1 * time2;
	var item4 = (item3*time4)/1000;
	t = setTimeout('left()',parseInt(item2));
	setTimeout('stopa()',parseInt(item2)+parseInt(item4));
}
$('#container').click(function(){
	stopa();
	clearTimeout(t);
});
$('body').css('background','none');
</script>

<script type="text/javascript">
function disableselect(e){ return false; }
function reEnable(){ return true; }

document.onselectstart = new Function ("return false");

if (window.sidebar){
	document.onmousedown=disable-select
	document.onclick=reEnable
}
</script>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-39821711-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</body>
</html>